\(\int \sin ^4(a+b x) \tan (a+b x) \, dx\) [105]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 40 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=\frac {\cos ^2(a+b x)}{b}-\frac {\cos ^4(a+b x)}{4 b}-\frac {\log (\cos (a+b x))}{b} \]

[Out]

cos(b*x+a)^2/b-1/4*cos(b*x+a)^4/b-ln(cos(b*x+a))/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2670, 272, 45} \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=-\frac {\cos ^4(a+b x)}{4 b}+\frac {\cos ^2(a+b x)}{b}-\frac {\log (\cos (a+b x))}{b} \]

[In]

Int[Sin[a + b*x]^4*Tan[a + b*x],x]

[Out]

Cos[a + b*x]^2/b - Cos[a + b*x]^4/(4*b) - Log[Cos[a + b*x]]/b

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2670

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x} \, dx,x,\cos (a+b x)\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \frac {(1-x)^2}{x} \, dx,x,\cos ^2(a+b x)\right )}{2 b} \\ & = -\frac {\text {Subst}\left (\int \left (-2+\frac {1}{x}+x\right ) \, dx,x,\cos ^2(a+b x)\right )}{2 b} \\ & = \frac {\cos ^2(a+b x)}{b}-\frac {\cos ^4(a+b x)}{4 b}-\frac {\log (\cos (a+b x))}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.88 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=-\frac {-\cos ^2(a+b x)+\frac {1}{4} \cos ^4(a+b x)+\log (\cos (a+b x))}{b} \]

[In]

Integrate[Sin[a + b*x]^4*Tan[a + b*x],x]

[Out]

-((-Cos[a + b*x]^2 + Cos[a + b*x]^4/4 + Log[Cos[a + b*x]])/b)

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.88

method result size
derivativedivides \(\frac {-\frac {\left (\sin ^{4}\left (b x +a \right )\right )}{4}-\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{2}-\ln \left (\cos \left (b x +a \right )\right )}{b}\) \(35\)
default \(\frac {-\frac {\left (\sin ^{4}\left (b x +a \right )\right )}{4}-\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{2}-\ln \left (\cos \left (b x +a \right )\right )}{b}\) \(35\)
risch \(i x +\frac {3 \,{\mathrm e}^{2 i \left (b x +a \right )}}{16 b}+\frac {3 \,{\mathrm e}^{-2 i \left (b x +a \right )}}{16 b}+\frac {2 i a}{b}-\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b}-\frac {\cos \left (4 b x +4 a \right )}{32 b}\) \(72\)
parallelrisch \(\frac {-32 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )-32 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )+32 \ln \left (\sec ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-11-\cos \left (4 b x +4 a \right )+12 \cos \left (2 b x +2 a \right )}{32 b}\) \(72\)
norman \(\frac {-\frac {2 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}-\frac {2 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}-\frac {8 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{4}}+\frac {\ln \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}-\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}{b}-\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )}{b}\) \(119\)

[In]

int(sec(b*x+a)*sin(b*x+a)^5,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/4*sin(b*x+a)^4-1/2*sin(b*x+a)^2-ln(cos(b*x+a)))

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.88 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=-\frac {\cos \left (b x + a\right )^{4} - 4 \, \cos \left (b x + a\right )^{2} + 4 \, \log \left (-\cos \left (b x + a\right )\right )}{4 \, b} \]

[In]

integrate(sec(b*x+a)*sin(b*x+a)^5,x, algorithm="fricas")

[Out]

-1/4*(cos(b*x + a)^4 - 4*cos(b*x + a)^2 + 4*log(-cos(b*x + a)))/b

Sympy [F(-1)]

Timed out. \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=\text {Timed out} \]

[In]

integrate(sec(b*x+a)*sin(b*x+a)**5,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.92 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=-\frac {\sin \left (b x + a\right )^{4} + 2 \, \sin \left (b x + a\right )^{2} + 2 \, \log \left (\sin \left (b x + a\right )^{2} - 1\right )}{4 \, b} \]

[In]

integrate(sec(b*x+a)*sin(b*x+a)^5,x, algorithm="maxima")

[Out]

-1/4*(sin(b*x + a)^4 + 2*sin(b*x + a)^2 + 2*log(sin(b*x + a)^2 - 1))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (38) = 76\).

Time = 0.34 (sec) , antiderivative size = 226, normalized size of antiderivative = 5.65 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=-\frac {\frac {3 \, {\left (\frac {\cos \left (b x + a\right ) + 1}{\cos \left (b x + a\right ) - 1} + \frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1}\right )}^{2} - \frac {20 \, {\left (\cos \left (b x + a\right ) + 1\right )}}{\cos \left (b x + a\right ) - 1} - \frac {20 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + 44}{{\left (\frac {\cos \left (b x + a\right ) + 1}{\cos \left (b x + a\right ) - 1} + \frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 2\right )}^{2}} - 2 \, \log \left ({\left | -\frac {\cos \left (b x + a\right ) + 1}{\cos \left (b x + a\right ) - 1} - \frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 2 \right |}\right ) + 2 \, \log \left ({\left | -\frac {\cos \left (b x + a\right ) + 1}{\cos \left (b x + a\right ) - 1} - \frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 2 \right |}\right )}{4 \, b} \]

[In]

integrate(sec(b*x+a)*sin(b*x+a)^5,x, algorithm="giac")

[Out]

-1/4*((3*((cos(b*x + a) + 1)/(cos(b*x + a) - 1) + (cos(b*x + a) - 1)/(cos(b*x + a) + 1))^2 - 20*(cos(b*x + a)
+ 1)/(cos(b*x + a) - 1) - 20*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 44)/((cos(b*x + a) + 1)/(cos(b*x + a) - 1
) + (cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 2)^2 - 2*log(abs(-(cos(b*x + a) + 1)/(cos(b*x + a) - 1) - (cos(b*x
 + a) - 1)/(cos(b*x + a) + 1) + 2)) + 2*log(abs(-(cos(b*x + a) + 1)/(cos(b*x + a) - 1) - (cos(b*x + a) - 1)/(c
os(b*x + a) + 1) - 2)))/b

Mupad [B] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.32 \[ \int \sin ^4(a+b x) \tan (a+b x) \, dx=\frac {\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{2\,b}+\frac {{\mathrm {tan}\left (a+b\,x\right )}^2+\frac {3}{4}}{b\,\left ({\mathrm {tan}\left (a+b\,x\right )}^4+2\,{\mathrm {tan}\left (a+b\,x\right )}^2+1\right )} \]

[In]

int(sin(a + b*x)^5/cos(a + b*x),x)

[Out]

log(tan(a + b*x)^2 + 1)/(2*b) + (tan(a + b*x)^2 + 3/4)/(b*(2*tan(a + b*x)^2 + tan(a + b*x)^4 + 1))